#ifndef MINESWEEPERENVIRONMENT_H_
#define MINESWEEPERENVIRONMENT_H_

#include "../Environment.h"
#include "../../Solution/2d/ValueEncoded/ValueEncodedSolution2d.h"

class MineSweeperEnvironment : public Environment
{
	public:
		MineSweeperEnvironment();
		virtual ~MineSweeperEnvironment();
        void configure();
        void configure(string);
        double evaluateFitness(Solution*);
        void generateRandomPopulation(vector<Solution*> &, unsigned int);
        string formatSolution(Solution*);
        void outputTable();
        Crossover *configureCrossover();
        
        static string getName();
        static Environment *getEnvironment();
    
    private:
        int getAdjacentMineCount(unsigned int, unsigned int, vector<vector<bool> >);
        void generateAdjacencyTable(int, int);
        int getIncorrectnessCount(vector<vector<bool> >);
        
        vector<vector<int> > adjacencyTable;
};

#endif /*MINESWEEPERENVIRONMENT_H_*/
